import React from "react"
import "./header.scss"
import { images } from "../../../assets"

interface IAuthorityHeaderProps {
  title?: string
  isRegister?: boolean
  firstTitle?: string
  secondTitle?: string
}

export const AuthorityHeader = (props: IAuthorityHeaderProps) => (
  <div className="authority-header">
    <img alt="" className="authority-icon" src={images.login.icons.pageReturnArrow} />
    {props.isRegister ? (
      <div>
        <span className="authority-first-title">{props.firstTitle}</span>
        <span className="authority-second-title">{props.secondTitle}</span>
      </div>
    ) : (
      <span className="authority-title">{props.title}</span>
    )}
  </div>
)
